-
-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql-server: Add behavior: auto_gc_behavior: enable. #8849
base: main
Are you sure you want to change the base?
Conversation
When Auto GC is enabled, the running sql-server will periodically collect a Dolt database that is growing in size. This behavior is currently experimental. Tuning the behavior around how often to collect is ongoing work.
…s to be more reliable.
… same database as the auto GC work.
@coffeegoddd DOLT
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -113,7 +115,8 @@ func NewSqlEngine( | |||
return nil, err | |||
} | |||
|
|||
all := dbs[:] | |||
all := make([]dsess.SqlDatabase, len(dbs)) | |||
copy(all, dbs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might add a note why making a copy here is important
if !ok { | ||
if store != nil { | ||
return store.ChunkJournal() | ||
} else { | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this impossible? Store is set in both cases above
// delivers when no GC is currently running. | ||
done chan struct{} | ||
// It simplifies the logic and efficiency of the | ||
// implementation a bit to have a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have a what?
type autoGCCommitHook struct { | ||
c *AutoGCController | ||
name string | ||
// Always non-nil, if this channel delivers this channel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit of a run-on
When Auto GC is enabled, the running sql-server will periodically collect a Dolt database that is growing in size. This behavior is currently experimental. Tuning the behavior around how often to collect is ongoing work.